package entity

import "time"

// SysUser 系统用户表
type SysUser struct {
	Id            int64      `gorm:"column:id" db:"id" json:"id" form:"id"`                                                //主键ID
	DeptId        *int64     `gorm:"column:dept_id" db:"dept_id" json:"deptId" form:"dept_id"`                             //部门ID
	Username      string     `gorm:"column:username" db:"username" json:"username" form:"username"`                        //用户名
	Nickname      *string    `gorm:"column:nickname" db:"nickname" json:"nickname" form:"nickname"`                        //昵称
	Password      string     `gorm:"column:password" db:"password" json:"password" form:"password"`                        //密码
	Email         *string    `gorm:"column:email" db:"email" json:"email" form:"email"`                                    //邮箱
	Phone         *string    `gorm:"column:phone" db:"phone" json:"phone" form:"phone"`                                    //手机
	Sex           int8       `gorm:"column:sex" db:"sex" json:"sex" form:"sex"`                                            //性别（0保密，1男，2女）
	Avatar        *string    `gorm:"column:avatar" db:"avatar" json:"avatar" form:"avatar"`                                //头像地址
	LoginTime     *time.Time `gorm:"column:login_time" db:"login_time" json:"loginTime" form:"login_time"`                 //最后登录时间
	LoginIp       *string    `gorm:"column:login_ip" db:"login_ip" json:"loginIp" form:"login_ip"`                         //最后登录IP
	LoginLocation *string    `gorm:"column:login_location" db:"login_location" json:"loginLocation" form:"login_location"` //最后登录地理位置
	Sort          *int16     `gorm:"column:sort" db:"sort" json:"sort" form:"sort"`                                        //排序
	Active        *bool      `gorm:"column:active" db:"active" json:"active" form:"active"`                                //是否开启（true激活，false禁用）
	Remark        *string    `gorm:"column:remark" db:"remark" json:"remark" form:"remark"`                                //备注
	Del           *bool      `gorm:"column:del" db:"del" json:"del" form:"del"`                                            //逻辑删除（false未删除，true已删除）
	CreateTime    *time.Time `gorm:"column:create_time" db:"create_time" json:"createTime" form:"create_time"`             //创建时间
	UpdateTime    *time.Time `gorm:"column:update_time" db:"update_time" json:"updateTime" form:"update_time"`             //修改时间
}
